package example;


import org.lwjgl.input.Keyboard;

import core.Colour;
import core.Game;
import core.Texture2D;

public class DepthTest extends Game {

   Texture2D texture;
   public DepthTest(boolean vsync) {
      super(vsync);
   }
   public DepthTest(String name, int width, int height, boolean resizable) {
      super(name,width,height,resizable);
      setFPS(60);
   }

   int rotation = 0;
   @Override
   public void init() {
      texture = new Texture2D("resources/gfx/1x1.png");
   }
 
   @Override
   public void update(long deltaTime) {
      rotation += 8;
   }
   
   
   @Override
   public void render() {
      super.render();
      spriteBatch.begin();
      spriteBatch.draw(texture, 100, 100, 100, 100, Colour.Red, 0.55557f, (float)Math.toRadians(rotation));
      spriteBatch.draw(texture, 100, 100, 100, 100, Colour.White, 0.55556f, (float)Math.toRadians(0));
      spriteBatch.draw(texture, 250, 200, 100, 100, Colour.Green, 1f,0f);
      spriteBatch.draw(texture, 200, 200, 100, 100, Colour.Blue, 0f,0f);
      spriteBatch.draw(texture, 200, 200, 100, 100, Colour.Blue, 0f,0f);
      spriteBatch.draw(texture, 200, 200, 100, 100, Colour.Blue, 0f,0f);
      spriteBatch.draw(texture, 200, 200, 100, 100, Colour.Blue, 0f,0f);
      spriteBatch.end();
   }//End method render
   
   public static void main(String[] args){
      new DepthTest("", 800, 600, true).run();
   }
}
